import './App.scss'
import { BrowserRouter, Route, Switch, Redirect } from 'react-router-dom'
import Layout from '@/pages/layout'
import Login from './pages/login'
import NotFound from './pages/404'
function App() {
  return (
    <BrowserRouter>
      <div className="app">
        {/* 配置路由规则 */}
        <Switch>
          <Redirect exact from="/" to="/home" />
          <Route path="/home" component={Layout} />
          <Route path="/login" component={Login} />
          {/* 兜底：404 */}

          <Route component={NotFound} />
        </Switch>
      </div>
    </BrowserRouter>
  )
}

export default App
